#!/usr/bin/env zsh

local arg="$1"

case "$arg" in
    -* | --*)
        __zplug::core::options::parse "$argv[@]"
        ;;

    check | install | update | list | clean | status | clear | load | info | help)
        shift
        __zplug::core::core::run_interfaces \
            "$arg" \
            "$argv[@]"
        ;;

    */*)
        __zplug::core::add::to_zplugs "$argv[@]"
        ;;

    "")
        __zplug::core::arguments::none
        ;;

    *)
        __zplug::core::arguments::exec "$argv[@]"
        ;;
esac

return $status
